package com.eduction.modules.system.dao;

import com.eduction.common.dbutil.DbHelper;
import com.eduction.modules.system.entity.ApplyFile;
import com.eduction.modules.system.entity.QuestionnaireSurvey;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;

@Repository
public class QuestionnaireSurveyRepository {

	@Autowired
	private DbHelper dbHelper;
	@Autowired
	private QuestionnaireSurveyDao questionnaireSurveyDao;

	public void save(QuestionnaireSurvey qs) {
		questionnaireSurveyDao.save(qs);
	}

	public QuestionnaireSurvey findbySchoolId(String school_id)throws SQLException {
		String sql = "SELECT * FROM questionnaire_survey where school_id = ? ";
		return dbHelper.getBean(sql, QuestionnaireSurvey.class, school_id);
	}
}

